from PIL import Image

class Hero(object):

    def __init__(self,姓名,头像):
        self.name = 姓名
        self.face = 头像

    def move(self):
        print(self.name,"移动了一步")

    def attack(self):
        print(self.name,"发起了一次普通攻击")

img1 = Image.open('./images/关羽.png')
h1 = Hero("关羽",img1)
h1.move()
h1.attack()
h1.wuqi = "青龙偃月刀"
img2 = Image.open('./images/关羽.png')
h2 = Hero("刘备",img2)
h2.move()
h2.face.show()